<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .box {
        height: 300px;
        background: pink;
        overflow: hidden;
        /* 触发一个bfc，就对外部没有影响了，解决子元素的margin不起作用 */
      }
      .inner {
        height: 200px;
        background: blue;
        margin-top: 50px;
      }
    </style>
  </head>
  <body>
    <div class="box">
      <div class="inner">1111</div>
    </div>
  </body>
</html>
